.family-tree {
  padding: 20rpx;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

  .header {
    text-align: center;
    margin-bottom: 20px;

    .title {
      font-size: 24px;
      font-weight: bold;
      color: white;
      margin-bottom: 5px;
    }

    .subtitle {
      font-size: 14px;
      color: rgb(255 255 255 / 80%);
    }
  }

  .control-section {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 16px rgb(0 0 0 / 10%);

    .control-title {
      font-size: 16px;
      font-weight: bold;
      color: #333;
      margin-bottom: 10px;
    }

    .input-group {
      margin-bottom: 20rpx;

      .input-label {
        font-size: 14px;
        color: #666;
        margin-bottom: 5px;
        display: block;
      }

      .input-field {
        border: 1px solid #e0e0e0;
        border-radius: 5px;
        padding: 10px;
        font-size: 14px;
        width: 100%;
        box-sizing: border-box;

        &:focus {
          border-color: #667eea;
          outline: none;
        }
      }

      .select-field {
        border: 1px solid #e0e0e0;
        border-radius: 5px;
        padding: 10px;
        font-size: 14px;
        width: 100%;
        background: white;
        box-sizing: border-box;
      }
    }

    .button-group {
      display: flex;
      gap: 10px;
      margin-top: 15px;

      .control-btn {
        flex: 1;
        background: #667eea;
        color: white;
        border: none;
        border-radius: 5px;
        padding: 10px;
        font-size: 14px;
        font-weight: bold;

        &.secondary {
          background: #764ba2;
        }

        &.danger {
          background: #ff6b6b;
        }

        &:active {
          opacity: 0.8;
        }
      }
    }
  }

  .tree-section {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 16px rgb(0 0 0 / 10%);

    .tree-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;

      .tree-title {
        font-size: 16px;
        font-weight: bold;
        color: #333;
        margin-bottom: 0;
      }

      .view-toggle-btn {
        background: #667eea;
        color: white;
        border: none;
        border-radius: 5px;
        padding: 8px 12px;
        font-size: 12px;
        font-weight: bold;

        &:active {
          opacity: 0.8;
        }
      }
    }

    .tree-container {
      min-height: 100px;
      border: 1px dashed #e0e0e0;
      border-radius: 5px;
      padding: 15px;
      text-align: center;

      .empty-state {
        color: #999;
        font-size: 14px;

        .empty-icon {
          font-size: 30px;
          margin-bottom: 10px;
          opacity: 0.5;
        }
      }

      .member-list {
          text-align: left;

          .member-item {
            background: #f8f9fa;
            border-radius: 5px;
            padding: 10px;
            margin-bottom: 8px;
            border-left: 2px solid #667eea;

            .member-name {
              font-size: 15px;
              font-weight: bold;
              color: #333;
              margin-bottom: 3px;
            }

            .member-relation {
              font-size: 12px;
              color: #666;
            }

            .member-actions {
              margin-top: 5px;
              display: flex;
              gap: 5px;

              .action-btn {
                padding: 4px 8px;
                font-size: 11px;
                border: 0.5px solid #ddd;
                border-radius: 3px;
                background: white;

                &.edit {
                  color: #667eea;
                  border-color: #667eea;
                }

                &.delete {
                  color: #ff6b6b;
                  border-color: #ff6b6b;
                }
              }
            }
          }
        }

        .tree-view {
          text-align: left;

          .tree-node-container {
            margin: 8px 0;
            
            .tree-node-content {
              display: flex;
              align-items: center;
              padding: 8px 10px;
              background: #f8f9fa;
              border-radius: 5px;
              border: 0.5px solid #e9ecef;
              
              .node-name {
                font-weight: bold;
                color: #333;
                font-size: 14px;
                margin-right: 8px;
              }
              
              .node-relation {
                color: #666;
                font-size: 11px;
                background: #e9ecef;
                padding: 3px 5px;
                border-radius: 8px;
              }
            }
            
           
    }
  }
}